/*
 * description: 租赁接口
 * author: Muze
*/

import request from '../utils/request'

// 商品分类
export function getLeaseClassify() {
    return request.get('lease_goods_category/lists');
}

// 商品列表
export function getLeaseGoodsList(params) {
    return request.get('lease_goods/lists', {params});
}

// 商品详情
export function getLeaseGoodsDetail(params) {
    return request.get('lease_goods/details', {params});
}

// 优惠券列表
export function getGoodsCoupon(params) {
    return request.get('coupon/getGoodsCoupon', {params});
}

// 领取优惠券
export function GetCoupon(params) {
    return request.post('coupon/getCoupon', params);
}

// 租赁商品评论内容分类列表
export function getGoodsComment(params) {
    return request.get('lease_goods_comment/category', {params});
}

// 租赁商品评论内容列表
export function getGoodsCommentList(params) {
    return request.get('lease_goods_comment/lists', {params});
}


// 结算详情/提交订单
export function leaseBuy(params) {
    return request.post('lease_order/buy', params);
}

// 收藏
export function leaseCollectGoods(params) {
    return request.post('lease_goods_collect/handleCollectGoods', params);
}

// 获取租赁订单数量
export function getLeaseOrderNum() {
    return request.get('lease_order/leaseOrderNum');
}

// 支付方式
export function payment() {
    return request.post('payment/payway');
}

// 获取租赁订单列表
export function getLeaseOrderList(params) {
    return request.get('lease_order/lists', {params});
}

// 订单详情
export function getLeaseOrderDetail(params) {
	return request.get('lease_order/detail', {params});
}

// 物流详情
export function getLeaseOrderExpress(params) {
	return request.get('lease_order/orderTraces', {params});
}

// 取消订单
export function leaseOrderCancel(params) {
	return request.post('lease_order/cancel', params);
}

// 商品评论
export function addLeaseGoodsComment(params) {
	return request.post('lease_goods_comment/addLeaseGoodsComment', params);
}

// 删除订单
export function leaseOrderDel(params) {
	return request.post('lease_order/del', params);
}

// 确认收货
export function leaseOrderConfirm(params) {
	return request.post('lease_order/confirm', params);
}

// 获取租赁商品收藏列表
export function getLeaseCollectGoods() {
	return request.get('lease_goods_collect/getCollectGoods');
}

// 还款账单
export function repaymentBill(params) {
	return request.post('lease_order/repaymentBill', params);
}

// 续租
export function leaseOrderRelet(params) {
	return request.post('lease_order/relet', params);;
}

// 换租 选择租期
export function lendleasePeriods(params) {
	return request.get('lease_goods/rentChangeDetails', {params});
}

// 换租下单
export function lendleaseOrder(params) {
	return request.post('lease_order/rentChangeBuy', params);
}

// 还机验证
export function leaseReturnCheck(params) {
	return request.post('lease_order/returnCheck', params);
}

// 还机账单
export function leaseReturnBill(params) {
	return request.post('lease_order/returnBill', params);
}

// 还机详情
export function leaseReturnDetail(params) {
	return request.post('lease_order/returnDetail', params);
}

// 还机寄件
export function leaseReturnMail(params) {
	return request.post('lease_order/mail', params);
}

// 买断
export function leaseBuyOut(params) {
	return request.post('lease_order/buyOut', params);
}

// 买断详情
export function leaseBuyOutDetail(params) {
	return request.post('lease_order/buyOutDetail', params);
}

// 租赁协议
export function getLeaseProtocol() {
	return request.get('policy/lease');
}

// 租赁合同详情
export function getLeaseContractDetail(params) {
	return request.post('lease_order/contractDetail', params);
}

// 租赁合同提交
export function leaseContractSubmit(params) {
	return request.post('lease_order/submitContract', params);
}

// 查询物流进度【还机|回收】
export function  queryExpressProgress(params) {
	return request.get('lease_order/logisticsInfo', { params });
}



